import request from '@/utils/request'

export function getCaseBillReturnTypes() {
  return request({
    url: '/api/Finance/CaseBillReturnStas/GetCaseBillReturnTypes',
    method: 'get',
  })
}

export function getCompanyCaseBillReturns(params) {
  return request({
    url: '/api/Finance/CaseBillReturnStas/GetCompanyCaseBillReturns',
    method: 'get',
    params
  })
}

export function getCompanyUnreturnCaseBills(params) {
  return request({
    url: '/api/Finance/CaseBillReturnStas/GetCompanyUnreturnCaseBills',
    method: 'get',
    params
  })
}

export function getCompanyBadDeftCaseBills(params) {
  return request({
    url: '/api/Finance/CaseBillReturnStas/GetCompanyBadDeftCaseBills',
    method: 'get',
    params
  })
}

export function addBillReturn(data) {
  return request({
    url: '/api/Finance/CaseBillReturnStas/AddBillReturn',
    method: 'post',
    data
  })
}

export function deleteBillReturn(id) {
  return request({
    url: '/api/Finance/CaseBillReturnStas/DeleteBillReturn',
    method: 'get',
    params: { id }
  })
}

export function setBadDeft(id, isBadDeft, date) {
  return request({
    url: '/api/Finance/CaseBillReturnStas/SetBadDeft',
    method: 'get',
    params: { id, isBadDeft, date }
  })
}